﻿CREATE PROCEDURE [dbo].[ETL_SP_GetCodeConversionRule]
	@DtTableId uniqueidentifier,
	@DtColumnId uniqueidentifier
AS
	SELECT CCR.*,
		D.Name as DimName,
		D.Code as DimCode,
		DI.Name as DimItemName,
		DI.Code as DimItemCode,
		DTC.Name as DtColumnName
	from ETL_CodeConversionRule as CCR
		inner join ETL_Dim as D on D.Id = CCR.DimId
		inner JOIN ETL_DimItem as DI on DI.Id = CCR.DimItemId
		INNER JOIN ETL_DtTableColumn as DTC on DTC.Id = CCR.DtColumnId
RETURN 0
